/**
* 这里封装首页轮播图组件
*/
<template>
	<view class="uni-margin-wrap">
		<!-- 
		 indicator-dots 是否显示面板指示点
		 circular 是否采用衔接滑动，即播放到末尾后重新回到开头
		 autoplay 是否自动切换
		 interval 自动切换时间间隔
		 -->
		<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
			:duration="duration">
			<swiper-item>
				<view class="swiper-item uni-bg-red">
				<navigator class="swiper-item" url="/pages/common/webview?src=http://tc.52jingsai.com/index/Index/index.html?pid=54839" >
					<image src="/static/images/banner/轮播图1.jpg"   mode=""></image>
				</navigator>
				</view>
			</swiper-item>
			<swiper-item>
				<view class="swiper-item uni-bg-green">
				<navigator class="swiper-item" url="/pages/common/webview?src=http://read.52jingsai.com/index/index/index.html?pid=45393" >
					<image src="/static/images/banner/轮播图2.jpg"   mode=""></image>
				</navigator>
				</view>
			</swiper-item>
			<swiper-item>
				<view class="swiper-item uni-bg-blue">
				<navigator class="swiper-item" url="/pages/common/webview?src=https://s.52jingsai.com/sai/55/54/0" >
					<image src="/static/images/banner/轮播图3.jpg"   mode=""></image>
				</navigator>
				</view>
			</swiper-item>
		</swiper>
	</view>

</template>

<script>
	export default {
		data() {
			return {
				background: ['color1', 'color2', 'color3'],
				indicatorDots: true,
				autoplay: true,
				interval: 2000,
				duration: 500
			}
		},
		methods: {
			changeIndicatorDots(e) {
				this.indicatorDots = !this.indicatorDots
			},
			changeAutoplay(e) {
				this.autoplay = !this.autoplay
			},
			intervalChange(e) {
				this.interval = e.target.value
			},
			durationChange(e) {
				this.duration = e.target.value
			}
		}
	}
</script>

<style scoped lang="scss">
	.uni-margin-wrap {
		width: calc(750rpx - 40rpx);
		.swiper {
			height: 300rpx;
			.swiper-item {
				display: block;
				height: 300rpx;
				line-height: 300rpx;
				text-align: center;
			}
		}
	}
	
</style>